package com.sky.module.system.heart.controller;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.sky.module.system.heart.domain.entity.HeartEntity;
import com.sky.module.system.heart.domain.form.HeartFormQuery;
import com.sky.module.system.heart.service.HeartService;
import com.sky.utils.Result;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author
 * @date 2023/3/11 17:05
 **/
@RestController
@RequestMapping("/api/heart")
public class HeartController {
    @Autowired
    private HeartService heartService;

    @PostMapping("list")
    public Result queryPage(@RequestBody HeartFormQuery heartFormQuery) {
        final Page<HeartEntity> heartEntityPage = heartService.queryPage(heartFormQuery);
        return Result.ok(heartEntityPage);
    }
}
